#include <iostream>
#include "Sales_item.h"

int main()
{
	Sales_item trans1, trans2;
	int num = 1;

	std::cout << "Enter some record:";
	if (std::cin >> trans1) {
		while (std::cin >> trans2) {
			if (compareIsbn(trans1, trans2)) {
				num ++;
			} else {
				std::cout << trans1.isbn() << " has "
						  << num << " times record " << std::endl;

				trans1 = trans2;
				num = 1;
			}

			std::cout << trans1.isbn() << " has "
					  << num << " times record " << std::endl; 
		}
	} else {
		std::cout << "No data" << std::endl;

		return -1;
	}

	return 0;
}
